import W from './test.customworker'

let buffer = null

class Worker {
  init() {
    const w = new W()

    w.onmessage = this.onMessage
  }

  onMessage = message => {
    buffer = message.data
    console.log('onmessage', message.data)
  }
}

export default new Worker()
